package com.toplabs.unashu.annotation;


import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author toplabs
 * @since 2022/11/22
 * <p>This java file was created by toplabs in 2022/11/22.
 * The following is the description information about this file:</p>
 * <p>description:自定义重推注解</p>
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface RetryableProcess {
    /**
     * @return 失败重试次数
     */
    int maxAttempts() default 3;

    /**
     * @return 重试策略、操作
     */
    BackoffProcess backoff() default @BackoffProcess;

    /**
     * @return 重试失败后的方法名
     */
    String recover() default "";
}